I don't think you can make it illegal for someone to choose to shun someone. The law can't force you to communicate with someone.
But, I think a strong case can be made that it should be illegal for an organization, religious or otherwise, to coerce members to shun others. It can be made illegal for an organization to teach members to shun a certain segment of society - including ex-members. I think there is a chance that such a law can be passed since there already exist laws that make it illegal to incite hatred of certain groups.
The key factors that have to be looked at is incitement and duress. Watchtower incites the members to shun and Watchtower uses a form of duress - the the very same threat of shunning - to coerce the members to shun those who leave.
People should be free to choose whether or not they wish to shun someone, without being incited to do so against a particular segment of people - ex-JWs - and without being coerced to do so.
So this should not be approached from the standpoint of making shunning illegal. Rather, it should be approached from the standpoint of making it illegal to publicly incite by speech or in print, to shun a particular segment of people; and to make it illegal to coerce persons to shun a certain segment of people, by the threat of being punished if they refuse to do so. This is all that needs to be done.
Once this is done, more JWs will feel free to talk to ex-JWs knowing that they cannot be penalized for doing so or else those penalizing them could face legal action with legal teeth.